<?php #coding: utf-8 æ ø å



if(isset($_POST['navn']) === true && empty($_POST['navn']) === false){

	mysql_connect($_POST['hostname'] ,$_POST['username'], $_POST['password']);
	mysql_select_db($_POST['database']);

	$query = mysql_query("
		SELECT navn, id_element as id, type_char
		FROM navn, individ
		WHERE navn.id_element = individ.id
		AND navn LIKE '%".$_POST['navn']."%'
	");

	$find_ikke = explode(",", $_POST['find_ikke']);

	echo "<div id='pc_resultat'>";
	while($row = mysql_fetch_array($query)){
		if(!in_array($row['id'],$find_ikke)){
			if($row['type_char'] == 1){
				$pc_npc = "PC";
			}else{
				$pc_npc = "NPC";
			}
			echo "<p class='ink'><input id='fundet' class='".$row['type_char']."' type='radio' name='pcer_soegt' value='".$row['id']."'>".$row['navn']." (".$pc_npc.")</p>";
		}
	}
	echo "</div>";

}

?>
